//获取桥页面并跳转
$(function () {
     $('#domain_group').change(function () {
         var domainId = $(this).children('option:selected').val();
         if (domainId == -1){
             window.location.href = '/bridge/overview'
         }
         else {
             window.location.href = '/bridge/viewdomain/'+ domainId;
         }
     })
 })

//定义搜索框
$(function () {
    $('#BridgeSearch').click(function () {
        var bridgeName = $('#Bridgename').val();
        //跳转至搜索页面
        window.location.href = '/bridge/searchbridge/'+ bridgeName;
    })
    $('#Bridgename').keydown(function (event) {
        if (event.keyCode == 13) {//当按下enter键时候触发
            var bridgeName = $('#Bridgename').val();
            //跳转至搜索页面
            window.location.href = '/bridge/searchbridge/' + bridgeName;
        }
    })
})
